import { AppstoreOutlined, MailOutlined, SettingOutlined } from '@ant-design/icons';
import { Menu as AntMenu } from 'antd';
import {  useNavigate, Link } from 'react-router-dom';
import { useState } from 'react';
const items = [
  {
    label: (<Link to="/">首页</Link>),
    key: 'mail',
    icon: <MailOutlined />,
  },
  {
    label: 'home页面',
    key: 'app',
    icon: <AppstoreOutlined />,
    // disabled: true,
  },
  {
    label: (<Link to="/home">home页面</Link>),
    key: 'alipay',
  },
];
const Menu = (props) => {
  const [current, setCurrent] = useState('mail');
  // const navigate = useNavigate();
  const onClick = (e) => {
    console.log('click ', e);
    // navigate("/session-timed-out");
    setCurrent(e.key);
  };
  return <AntMenu onClick={onClick} selectedKeys={[current]} mode="horizontal" items={items} />;
};
export default Menu;